#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

//class Person
//{
//public:
//	void showClassName()
//	{
//		cout << "this is Person class" << endl;
//	}
//	void showClassAge()
//	{
//		cout << "age = " << m_Age << endl;
//	}
//	int m_Age;
//};
//void test01()
//{
//	Person* p = NULL;
//
//	p->showClassName();//right
//	p->showClassAge();//error
//
//}
//int main()
//{
//	test01();
//	return 0;
//}

class Person
{
public:
	void showClassName()
	{
		cout << "this is Person class" << endl;
	}
	void showClassAge()
	{
		if (this == NULL)
		{
			return;
		}
		cout << "age = " << m_Age << endl;
	}
	int m_Age;
};
void test01()
{
	Person* p = NULL;

	p->showClassName();
	p->showClassAge();

}
int main()
{
	test01();
	return 0;
}

